#ifndef ADUROAD_H_
#define ADUROAD_H_

#include "cocos2d.h"
#include "ADUMovable.h"

using namespace cocos2d;

class ADUCar;

class ADURoad : public CCTMXTiledMap{

private:
	CCArray *listeners;
	CCTMXLayer* m_background;
	CCTMXLayer* m_meta;
	int m_speed;
public:

	ADURoad();
	~ADURoad();

	static ADURoad* CreateRoadByFileName(const char* tmxFileName);
	void setBackground(CCTMXLayer* bg);
	CCTMXLayer* getBackground();

	void setMeta(CCTMXLayer* mt);
	CCTMXLayer* getMeta();

	void onSpeedChanged();

	void setSPeed(int speed);
	int getSpeed();

	void startRun();

	void addListener(ADUMovable* m);
	void removeListener(ADUMovable* m);

	void notifySpeedChanged();
};

#endif
